<%--
  Created by IntelliJ IDEA.
  User: na
  Date: 2019/4/13
  Time: 14:17
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
    <title>Title</title>
</head>
<body>
第<b>${pageSupport.currentPage}</b>页&nbsp;&nbsp;
<a class="layui-btn layui-btn-sm" href="${servletURL}&pageNumber=1">首页</a>
<a class="layui-btn layui-btn-sm" href="${servletURL}&pageNumber=${pageSupport.currentPage-1>0?pageSupport.currentPage-1:1}">上一页</a>
<a class="layui-btn layui-btn-sm" href="${servletURL}&pageNumber=${pageSupport.currentPage+1<pageSupport.totalPages?pageSupport.currentPage+1:pageSupport.totalPages }">下一页</a>
<a class="layui-btn layui-btn-sm" href="${servletURL}&pageNumber=${sessionScope.pageSupport.totalPages}">末页</a>
&nbsp;&nbsp;共<b>${sessionScope.pageSupport.totalPages}</b>页&nbsp;&nbsp;
<select id="jump1">
    <c:forEach begin="1" varStatus="tea" end="${pageSupport.totalPages}">
        <option name="op1" value="${tea.count}">第${tea.count}页</option>
    </c:forEach>
</select> &nbsp;&nbsp;
<b class="layui-btn layui-btn-sm" onclick="jump()">跳转页面</b>
<script>
    document.getElementsByName("op1")[${pageSupport.currentPage-1}].selected=true;
    function jump() {
        var number=document.getElementById("jump1").value;
        location="${servletURL}&pageNumber="+number;
    }
</script>

</body>
</html>
